package code20_jdbc.改写学生管理.mapper;

import java.sql.ResultSet;
import java.sql.SQLException;

import code20_jdbc.改写学生管理.entity.Clazz;
import code20_jdbc.改写学生管理.util.RowMapper;

public class ClazzMapper implements RowMapper<Clazz>{

	@Override
	public Clazz mapRow(ResultSet rs) throws SQLException {
		Clazz clazz = new Clazz();
		clazz.setCid(rs.getInt("cid"));
		clazz.setCname(rs.getString("cname"));
		clazz.setRoom(rs.getString("room"));
		return clazz;
	}

}
